<%
function getSysInfo()
	dim dict,ctrl
	set dict = D_
	set ctrl = P_("CONTROLLER")
	dict("服务器环境") = ctrl.var("SERVER_SOFTWARE")
	dict("主机名 (IP:端口)") = ctrl.var("SERVER_NAME") & " (" & ctrl.var("HTTP_HOST") & ")"
	dict("CGI版本") = ctrl.var("GATEWAY_INTERFACE")
	dict("数据库大小") = byte2size(POP_MVC.File.fileSize( C_("DB_PATH") ))
	dict("脚本最大执行时间") = Server.ScriptTimeout & "秒"
	dict("您的浏览器") = ctrl.var("HTTP_USER_AGENT")
	dict("Session过期时间") = session.timeout & "分钟"
	set getSysInfo = dict
End Function

Function send_mail(address, title, content)
	dim jmail
	Server.ScriptTimeOut=5000
	call C_( array( "MAIL_CHARSET" , "UTF-8" ) )	
	Set jmail = Server.CreateObject("JMail.Message")   '创建一个JMAIL对象 	
    jmail.silent = True    'JMAIL不会抛出例外错误，返回的值为FALSE跟TRUE
    jmail.logging = False   '启用邮件日志
    jmail.Charset = C_("MAIL_CHARSET")  '邮件文字的代码为简体中文 
    jmail.ISOEncodeHeaders = False '防止邮件标题乱码
    jmail.ContentType = "text/html"    '邮件的格式为HTML格式
    jmail.AddRecipient address    '邮件收件人的地址
    jmail.From = C_("MAIL_USERNAME")    '邮件发送者的邮件地址
    jmail.FromName = C_("MAIL_FROMNAME")    '邮件发送者的姓名 
    jmail.MailServerUserName = C_("MAIL_USERNAME")    '登录邮件服务器所需的用户名
    jmail.MailServerPassword = C_("MAIL_PASSWORD")     '登录邮件服务器所需的密码
    jmail.Subject = title    '邮件的标题 
    jmail.Body = content      '邮件的内容
    jmail.Priority = 1      '邮件的紧急程序，1 为最快，5 为最慢， 3 为默认值
    jmail.Send(C_("MAIL_HOST") & ":" &  C_("MAIL_PORT"))     '执行邮件发送（通过邮件服务器地址）
    

	if jmail.ErrorCode <> 0 then
		send_mail = jmail.log
	else
		send_mail = jmail.ErrorCode
	end If
	jmail.Close()   '关闭对象
End Function
%>